AssetWise CONNECT Edition Implementation Guide

Grids.json

Overview

In AssetWise CONNECT Edition, grids display tables of data. Grids are defined in grids.json. For example:

gridId

Each grid has a unique identifier string. The string is a prefix of the plugin’s name that the grid was originally defined in. For example, "eB_Tag" is a grid of tags. If "eB_Tag" is in a configuration file of another WUIFPlugin, then it is said that “Plugin p is dependent upon eB.WUIFPlugin”.

gridOptions

Each grid includes a property called “gridOptions”. Grid options define how to query data from the datasource. The property is known as “dataOptions”. A grid service populates the grid with the data returned from the datasource.

Grid options also have a list of columns. Each column declares what field of data to be displayed, the template to use, the order of the columns, the localized title, and the default width.

Below are commonly used Grid Option properties:

Note: See grids.ts for the full list of properties.
Note: Grids.ts may be extended by a WUIFPlugin for the purpose of adding plugin specific features.
Property Parameter Required Type Details
dataOptions classes
A list of classes to query, separated by commas. Usually EC classes unless schemaName is set to "eB".
schemaName
The name of the schema that contains the classes in the dataOptions.classes property. If using the generated schema, this value should be “EB_ECPLUGIN_SCHEMA”.
IncludeSubClasses
boolean Most often set to "True".

When "True", a polymorphic query occurs. In other words, if a class in the dataOptions.classes property is a parent class and IncludeSubClasses is set to "True" then the result shows instances of all of the class’s child classes (i.e., Global_Tag_Tag class shows all classes of tags since all Tag classes inherit from this), set this property to "True". Otherwise, if you want to show instances of the configured class only, set it to "False".

objectType numeric AssetWise object type number, defined in object.types.json.
select array An array of properties (usually EC properties) of the class to return.
filter The WSG query filter. Use proper WSG formatting.
sysType If an eB sub-classifcation is being used, include this property.
appendProperties Allows appending of properties to every row in a results set.
appendRelationshipProperties Take a specific relationship property by its class name, schema name, and property and put it on the root level of the object.
abortRequest boolean If "True", a request will not be executed, and the abortRequestResponse function is invoked.
gridColumns field
text The name of the property to display in the column. Most likely will be an EC property. This should be a property in the Select property list or in the Relationship property select list.
title
text The text to display in the column header.
showCheckColumn boolean If selected, the column will appear in the grid. It should be in your Select property list.
width numeric The width of the column, in pixels.
hidden boolean If "True", then the column is hidden from view.
order integer Denotes the chronological order (from left to right) that the property appears in the table.
customDataSource Specifies sorting and ordering of results instructions that are to be included with the datasource query.
noRecordsLabel The text that appears when there are no instances returned by a query.

This property is localized prior to displaying on the template.

includeEstimatedCount Set to "False" in order to hide the Estimated Count field located in the top left corner of a grid.
pageSize The default amount of rows to display before paging.
dragAndDrop Includes options for drag and drop behavior.
resizable boolean Most often set to "True".

Enables resizing of columns by clicking and dragging column borders.

scrollable boolean Usually set to "False".

Set to "True" to enable a scrollbar to be visible when the grid is wider than its container. Set to "False" if you want the columns to shrink to fit.

Note: If set to "True", all columns that you define in the gridColumns array must have an assigned width.
gridActions array

The Actions that display in the Actions menu.

Note: Be sure to assign the proper type, to ensure compatibility with the object.